#-*- Makefile -*-
include ../../gnuwin32/MkRules

DEFS=-DWIN32 -DPCRE_STATIC

CPPFLAGS=-I../../include -I. $(DEFS)
CFLAGS= $(OPTFLAGS)

## done this way for parallel make
all:
	$(MAKE) -f Makefile.win makeMakedeps
	$(MAKE) -f Makefile.win libpcre.a

CSOURCES = pcre_chartables.c pcre_compile.c pcre_config.c pcre_exec.c \
	pcre_fullinfo.c pcre_get.c pcre_globals.c pcre_info.c \
	pcre_maketables.c pcre_newline.c pcre_ord2utf8.c pcre_refcount.c \
	pcre_study.c pcre_tables.c pcre_try_flipped.c pcre_ucd.c \
	pcre_valid_utf8.c pcre_version.c pcre_xclass.c
OBJS=$(CSOURCES:.c=.o)
libpcre.a: $(OBJS)

clean:
	@$(RM) *.o *~ *.d Makedeps

distclean: clean
	@$(RM) libpcre.a

# Dependencies
DEPS=$(CSOURCES:.c=.d)

makeMakedeps: $(DEPS)
	@$(RM) Makedeps
	@cat $(DEPS) >> Makedeps

-include Makedeps
